package org.yaac.server.delegate;

import java.util.Set;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserServiceFactory;

/**
 * @author Max Zhu (thebbsky@gmail.com)
 *
 */
public class UserServiceDelegateImpl implements UserServiceDelegate {

	/* (non-Javadoc)
	 * @see org.yaac.server.service.UserServiceDelegate#createLoginURL(java.lang.String, java.lang.String, java.lang.String, java.util.Set)
	 */
	@Override
	public String createLoginURL(String arg0, String arg1, String arg2, Set<String> arg3) {
		return UserServiceFactory.getUserService().createLoginURL(arg0, arg1, arg2, arg3);
	}

	/* (non-Javadoc)
	 * @see org.yaac.server.service.UserServiceDelegate#createLoginURL(java.lang.String, java.lang.String)
	 */
	@Override
	public String createLoginURL(String arg0, String arg1) {
		return UserServiceFactory.getUserService().createLoginURL(arg0, arg1);
	}

	/* (non-Javadoc)
	 * @see org.yaac.server.service.UserServiceDelegate#createLoginURL(java.lang.String)
	 */
	@Override
	public String createLoginURL(String arg0) {
		return UserServiceFactory.getUserService().createLoginURL(arg0);
	}

	/* (non-Javadoc)
	 * @see org.yaac.server.service.UserServiceDelegate#createLogoutURL(java.lang.String, java.lang.String)
	 */
	@Override
	public String createLogoutURL(String arg0, String arg1) {
		return UserServiceFactory.getUserService().createLogoutURL(arg0, arg1);
	}

	/* (non-Javadoc)
	 * @see org.yaac.server.service.UserServiceDelegate#createLogoutURL(java.lang.String)
	 */
	@Override
	public String createLogoutURL(String arg0) {
		return UserServiceFactory.getUserService().createLogoutURL(arg0);
	}

	/* (non-Javadoc)
	 * @see org.yaac.server.service.UserServiceDelegate#getCurrentUser()
	 */
	@Override
	public User getCurrentUser() {
		return UserServiceFactory.getUserService().getCurrentUser();
	}

	/* (non-Javadoc)
	 * @see org.yaac.server.service.UserServiceDelegate#isUserAdmin()
	 */
	@Override
	public boolean isUserAdmin() {
		return UserServiceFactory.getUserService().isUserAdmin();
	}

	/* (non-Javadoc)
	 * @see org.yaac.server.service.UserServiceDelegate#isUserLoggedIn()
	 */
	@Override
	public boolean isUserLoggedIn() {
		return UserServiceFactory.getUserService().isUserLoggedIn();
	}
}
